<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('customer/index')}">客户列表</a></li>
			<li><a href="{:url('customer/add')}">添加客户</a></li>
		</ul>
        <form class="well form-inline margin-top-20" method="get" action="{:url('customer/index')}">
            客户名称:
            <input type="text" class="form-control" name="name" style="width: 220px;" value="{:input('request.name/s','')}">
            联系方式:
            <input type="text" class="form-control" name="mobile" style="width: 220px;" value="{:input('request.mobile/s','')}">
            <input type="submit" class="btn btn-primary" value="搜索" />
            <a class="btn btn-danger" href="{:url('customer/index')}">清空</a>
        </form>
        <br>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>客户名称</th>
					<th>客户类型</th>
					<th>联系电话</th>
					<th width="140">{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="list" item="vo">
					<tr>
						<td>{$vo.id}</td>
						<td>{$vo.name}</td>
						<td>{$vo.type_text}</td>
						<td>{$vo.mobile}</td>
						<td>
							<a class="btn btn-xs btn-primary" href='{:url("customer/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
                        	<a class="btn btn-xs btn-danger js-ajax-delete" href='{:url("customer/delete",array("id"=>$vo["id"]))}'>{:lang('DELETE')}</a>
						</td>
					</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>